package com.zjl.spring.thread;

/**
 * @Auther: zhuangjl
 * @Date: 2021/11/10 15:21
 */
public class ThreadModifyDemo {

    public static void main(String[] args) {

        Thread thread1 = new Thread(()->{

            while(true){

            }
        },"thread1-v1");
        System.out.println(thread1.getName());
        thread1.setName("thread1-v2");
        System.out.println(thread1.getName());
        thread1.start();
        thread1.setName("thread1-v3");
        System.out.println(thread1.getName());
    }
}
